package random;

import java.util.*;

public class cetnost_nahodnych_cisel {

    static Random randGen = new Random();
    static int nuly, jednicky, dvojky, spots,i;

    public static void main(String[] args) {

        for (i = 0; i < 1000000; i++) {
            spots = randGen.nextInt(10);

            if (spots == 0) {
                nuly++;
            }
            if (spots == 1) {
                jednicky++;
            }
            if (spots == 2) {
                dvojky++;
            }

        }
        System.out.println("Pocet vygerenovanych cisel : " + i);
        System.out.println("Pocet nul : " + nuly);
        System.out.println("Pocet jednicek : " + jednicky);
        System.out.println("Pocet dvojek : " + dvojky);
    }
}
